using System.Collections;
using UnityEngine;

public class ShockStunRing : MonoBehaviour
{
	public Transform tf;

	private float endTime;

	public void Init(Transform TF_Target)
	{
		StartCoroutine(IE_Show(TF_Target));
	}

	private IEnumerator IE_Show(Transform TF_Target)
	{
		endTime = Time.time + 1f;
		while (TF_Target != null && endTime > Time.time)
		{
			tf.position = TF_Target.position;
			if (tf.position.y < 0f)
			{
				tf.position = new Vector2(tf.position.x, 0f);
			}
			yield return new WaitForFixedUpdate();
		}
		base.gameObject.SetActive(false);
	}
}
